package com.hdax.service.Impl;

import com.hdax.entity.Menu;
import com.hdax.mappers.PermissionMapper;
import com.hdax.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Aizen
 * @date 2022/05/07
 */
@Service
public class MenuServiceImpl implements MenuService {

    /**
     * 许可映射器
     */
    @Autowired
    private PermissionMapper permissionMapper;

    /**
     * 菜单
     *
     * @param rid 传入角色ID获取菜单集合
     * @return {@link List}<{@link Menu}>
     */
    @Override
    public List<Menu> menus(Integer rid) {
        return permissionMapper.menuPermissions1(rid);
    }
}
